import { Card, Col, Row} from 'antd';
import React, { useRef } from 'react';
import { Link } from 'umi';
import SuperIcon from '@/components/SuperIcon'
import styles from './style.less';
import FullScreenView from '@/components/FullScreenView';
const TopSearch = ({ loading,scrollInfo }) => {
  const fullRef = useRef(null);
  return (
    <Card
      loading={loading}
      bordered={false}
      title="快捷入口"
      style={{
        height: '100%',
      }}
    >
      <Row gutter={68} type="flex">
        <Col
          sm={8}
          xs={24}
          style={{
            marginBottom: 24,
          }}
        >
          <Link to="/vip/center/save" className={styles.link}>
            <div className={styles.icon}><SuperIcon type="icon-tianjiahuiyuan" /></div>
            <div><span>添加会员</span></div>
          </Link>
        </Col>
        <Col
          sm={8}
          xs={24}
          style={{
            marginBottom: 24,
          }}
        >
          <Link to="/sign/reservation" className={styles.link}>
            <div className={styles.icon}><SuperIcon type="icon-yuyue" /></div>
            <div><span>会员预约</span></div>
          </Link>
        </Col>
        <Col
          sm={8}
          xs={24}
          style={{
            marginBottom: 24,
          }}
        >
          <Link to="/sign/signIn" className={styles.link}>
            <div className={styles.icon}><SuperIcon type="icon-qiandao" /></div>
            <div><span>会员签到</span></div>
          </Link>
        </Col>
        <Col
          sm={8}
          xs={24}
          style={{
            marginBottom: 24,
          }}
        >
          <Link to="/vip/bind-card/save" className={styles.link}>
            <div className={styles.icon}><SuperIcon type="icon-bangdingyinxingqia" /></div>
            <div className={styles.text}><span>会员绑卡</span></div>
          </Link>
        </Col>
        <Col
          sm={8}
          xs={24}
          style={{
            marginBottom: 24,
          }}
        >
          <Link to="/lesson/private/save" className={styles.link}>
            <div className={styles.icon}><SuperIcon type="icon-RectangleCopy" /></div>
            <div><span>私教排班</span></div>
          </Link>
        </Col>
        <Col
          sm={8}
          xs={24}
          style={{
            marginBottom: 24,
          }}
        >
          <div onClick={()=>fullRef?.current?.show()} className={styles.link}>
            <div className={styles.icon}><SuperIcon type="icon-changguanyuyue" /></div>
            <div><span>场馆大屏</span></div>
          </div>
        </Col>
      </Row>
      <FullScreenView ref={fullRef} scrollInfo={scrollInfo}/>
    </Card>
  )
};

export default TopSearch;
